package batframework.mvc.render;

import java.io.IOException;

import batframework.mvc.exception.RenderException;


public class RedirectRender extends AbstractRender
{
	
	private String url;

	public void render()
	{
		try {
			response.sendRedirect(new StringBuilder(url).append(model.getQueryString()).toString());
		} catch (IOException e) {
			throw new RenderException(e);
		}
	}
	
	/**
	 * 
	 * @ author bmyues
	 * @param url
	 */
	public RedirectRender(String url)
	{
		this.url = url;
	}
	
	
}
